/*
 * CWinClass.h
 *
 *  Created on: 2012-1-26
 *      Author: Administrator
 */

#ifndef CWINCLASS_H_
#define CWINCLASS_H_

#include <windows.h>

/*TODO
 *
#define CS_KEYCVTWINDOW     0x0004
#define CS_NOKEYCVT         0x0100
#define CS_SAVEBITS         0x0800
 */
class CWinClass {
private:
	WNDCLASS* wndclass;
	static map<unsigned int, CWinMsg> msgTypeLib = new map<unsigned int, CWinMsg>();
public:
	//members:
	static const unsigned int REDRAW = CS_VREDRAW | CS_HREDRAW;
	static const unsigned int DCLICK = CS_DBLCLKS;
	static const unsigned int UNQDC = CS_OWNDC;
	static const unsigned int CLSDC = CS_CLASSDC;
	static const unsigned int SUBDC = CS_PARENTDC;
	static const unsigned int GLOBALCLS = CS_GLOBALCLASS;
	static const unsigned int WNDBORDER = CS_BYTEALIGNWINDOW;
	static const unsigned int SUBBORDER = CS_BYTEALIGNCLIENT;


	//methods:
	/*WNDCLASS* getWndClass();
	void setWndClass(WNDCLASS* wndCls);*/

	void unsigned short registerWndClass();

	void setWndProc(LRESULT CALLBACK (*wndProc) (HWND hwnd, unsigned int message, WPARAM wParam, LPARAM lParam));
	LRESULT CALLBACK wndProc (HWND hwnd, unsigned int message, WPARAM wParam, LPARAM lParam);

	void setStype(unsigned int style);
	void setClsExtra(int clsExtra);
	void setWndExtra(int wndExtra);
	void setInstance(void * instance);
	void setIcon(void * icon);
	void setHCursor(void * cursor);
	void setBackGroud(void * brush);
	void setMenuName(TCHAR* menuName);
	void setClassName(TCHAR* className)
}

#endif /* CWINCLASS_H_ */
